package com.bdqn.service.impl;

import com.bdqn.dao.smbms_userdao;
import com.bdqn.entity.user;
import com.bdqn.service.smbms_userService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class smbms_userServiceImpl implements smbms_userService {

    @Autowired
    @Qualifier("smbms_userdao")
    private smbms_userdao user;

    @Override
    public int getAllCount(Map map) {
      return user.getAllCount(map);
    }

    @Override
    public int addUser(user u) {
        return user.addUser(u);
    }

    @Override
    public user getUser(Integer id) {
        return user.getUser(id);
    }

    @Override
    public int updUser(user u) {
        return user.updUser(u);
    }


    @Override
    public List<user> getAlluserBynames(Map map) {
        System.err.println("service");
        return user.getAlluserBynames(map);
    }

    @Override
    public user Login(String name , String pwd) {
        return user.Login(name , pwd);
    }

    @Override
    public int delUser(Integer id) {
        return user.delUser(id);
    }

    @Override
    public int updPwd(Integer id, String userPwd) {
        return user.updPwd(id, userPwd);
    }
}
